

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="https://i.loli.net/2021/11/21/KLIcp3NhoymnFP2.jpg">
  <link rel="icon" href="https://i.loli.net/2021/11/21/KLIcp3NhoymnFP2.jpg">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="逝者如斯夫，不舍昼夜。">
  <meta name="author" content="余龙">
  <meta name="keywords" content="">
  <meta name="description" content="逝者如斯夫，不舍昼夜。">
<meta property="og:type" content="website">
<meta property="og:title" content="YL&#39;Blog">
<meta property="og:url" content="http://gis-yu.gitee.io/gis-yu/index.html">
<meta property="og:site_name" content="YL&#39;Blog">
<meta property="og:description" content="逝者如斯夫，不舍昼夜。">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="余龙">
<meta name="twitter:card" content="summary_large_image">
  
  <title>YL&#39;Blog</title>

  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/css/bootstrap.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/gis-yu/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    var CONFIG = {"hostname":"gis-yu.gitee.io","root":"/gis-yu/","version":"1.8.12","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"right","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"copy_btn":true,"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname"}},"search_path":"/gis-yu/local-search.xml"};
  </script>
  <script  src="/gis-yu/js/utils.js" ></script>
  <script  src="/gis-yu/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.4.0"></head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/gis-yu/">
      <strong>YL&#39;Blog</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/gis-yu/">
                <i class="iconfont icon-home-fill"></i>
                主页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/gis-yu/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/gis-yu/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/gis-yu/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/gis-yu/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              &nbsp;<i class="iconfont icon-search"></i>&nbsp;
            </a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner" id="banner" parallax=true
         style="background: url('https://tva1.sinaimg.cn/large/008i3skNly1gwkrm8dqzdj31hc0u0n3d.jpg') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="page-header text-center fade-in-up">
            <span class="h2" id="subtitle" title="逝者如斯夫，不舍昼夜。">
              
            </span>

            
          </div>

          
            <div class="scroll-down-bar">
              <i class="iconfont icon-arrowdown"></i>
            </div>
          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      <div class="container nopadding-x-md">
        <div class="py-5" id="board"
          >
          
          <div class="container">
            <div class="row">
              <div class="col-12 col-md-10 m-auto">
                


  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/gis-yu/2022/04/20/%E4%BB%80%E4%B9%88%E6%98%AFVuex%EF%BC%9F/" target="_self">
          <img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h1gi4p5lxmj21hc0u0dgu.jpg" srcset="/gis-yu/img/loading.gif" lazyload alt="什么是Vuex？">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/gis-yu/2022/04/20/%E4%BB%80%E4%B9%88%E6%98%AFVuex%EF%BC%9F/" target="_self">
          什么是Vuex？
        </a>
      </h1>

      <p class="index-excerpt">
        <a href="/gis-yu/2022/04/20/%E4%BB%80%E4%B9%88%E6%98%AFVuex%EF%BC%9F/" target="_self">
          
          
            
          
          Vuex是什么？Vuex是专为Vue.js应用程序开发的状态管理模式。它采用集中式存储管理应用组件的状态，并以相应的规则保证状态以一种可预测的方式发生变化。
普通的状态管理模式123456789101112131415161718new Vue(&#123;  // state  data () &#123;    return &#123;      count: 0    &#125;  &#
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2022-04-20 21:18" pubdate>
              2022-04-20
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/gis-yu/categories/%E5%89%8D%E7%AB%AF%E6%A1%86%E6%9E%B6/">前端框架</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/gis-yu/tags/Vue/">Vue</a>
            
              <a href="/gis-yu/tags/Vuex/">Vuex</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/gis-yu/2022/04/11/HTML%E4%B8%8ECSS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%EF%BC%88%E4%B8%89%EF%BC%89/" target="_self">
          <img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h161yc3o3kj21hc0u0e3g.jpg" srcset="/gis-yu/img/loading.gif" lazyload alt="HTML与CSS基础知识（三）">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/gis-yu/2022/04/11/HTML%E4%B8%8ECSS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%EF%BC%88%E4%B8%89%EF%BC%89/" target="_self">
          HTML与CSS基础知识（三）
        </a>
      </h1>

      <p class="index-excerpt">
        <a href="/gis-yu/2022/04/11/HTML%E4%B8%8ECSS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%EF%BC%88%E4%B8%89%EF%BC%89/" target="_self">
          
          
            
          
          HTML&amp;&amp;CSS(三)1.为什么要初始化CSS样式？1.浏览器差异不同的浏览器对有些标签的默认值是不同的，如果没对CSS初始化会出现浏览器之间的压面显示差异
2.提高编码质量如果不初始化，整个页面做完会很糟糕，重复的CSS样式很多
2.CSS3新增的伪类有哪些？123456789p:first-of-type  选择属于其父元素的首个元素p:last-of-type  选择属于其
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2022-04-11 20:24" pubdate>
              2022-04-11
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/gis-yu/categories/%E5%89%8D%E7%AB%AF%E5%9F%BA%E7%A1%80/">前端基础</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/gis-yu/tags/HTML/">HTML</a>
            
              <a href="/gis-yu/tags/CSS/">CSS</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/gis-yu/2022/04/10/HTML%E4%B8%8ECSS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%EF%BC%88%E4%BA%8C%EF%BC%89/" target="_self">
          <img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h14pt9b60yj21y30u0qe4.jpg" srcset="/gis-yu/img/loading.gif" lazyload alt="HTML与CSS基础知识（二）">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/gis-yu/2022/04/10/HTML%E4%B8%8ECSS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%EF%BC%88%E4%BA%8C%EF%BC%89/" target="_self">
          HTML与CSS基础知识（二）
        </a>
      </h1>

      <p class="index-excerpt">
        <a href="/gis-yu/2022/04/10/HTML%E4%B8%8ECSS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%EF%BC%88%E4%BA%8C%EF%BC%89/" target="_self">
          
          
            
          
          HTML&amp;CSS(二)1.优雅降级与渐进增强渐进增强（progressive enhancement）针对低版本浏览器进行构建项目，保证最基本的功能，然后再针对高级浏览器进行效果、交互等改进和追加功能达到更好的用户体验。
优雅降级（graceful degradation）一开始就构建完整的功能，然后再针对低版本浏览器进行兼容。
区别a.优雅降级是从复杂的现状开始，并试图减少用户体验的供给
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2022-04-10 16:37" pubdate>
              2022-04-10
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/gis-yu/categories/%E5%89%8D%E7%AB%AF%E5%9F%BA%E7%A1%80/">前端基础</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/gis-yu/tags/HTML/">HTML</a>
            
              <a href="/gis-yu/tags/CSS/">CSS</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/gis-yu/2022/03/29/HTML%E4%B8%8ECSS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%EF%BC%88%E4%B8%80%EF%BC%89/" target="_self">
          <img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h0r0lr6y32j21hc0u0teh.jpg" srcset="/gis-yu/img/loading.gif" lazyload alt="HTML与CSS基础知识（一）">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/gis-yu/2022/03/29/HTML%E4%B8%8ECSS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%EF%BC%88%E4%B8%80%EF%BC%89/" target="_self">
          HTML与CSS基础知识（一）
        </a>
      </h1>

      <p class="index-excerpt">
        <a href="/gis-yu/2022/03/29/HTML%E4%B8%8ECSS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%EF%BC%88%E4%B8%80%EF%BC%89/" target="_self">
          
          
            
          
          HTML&amp;CSS(一)1.Chrome盒模型与IE盒模型的区别每个元素在页面中占位大小 = content+padding+margin+borderChrome盒模型内容大小等于content大小；
IE盒模型内容大小等于content+padding+border的总和。

2.行内元素和块级元素HTML（超文本标记语言）元素大多数都是行内元素或块级元素。一个行内元素只占据它对应标签的
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2022-03-29 20:13" pubdate>
              2022-03-29
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/gis-yu/categories/%E5%89%8D%E7%AB%AF%E5%9F%BA%E7%A1%80/">前端基础</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/gis-yu/tags/HTML/">HTML</a>
            
              <a href="/gis-yu/tags/CSS/">CSS</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/gis-yu/2022/03/03/02-%E5%90%84%E4%BD%8D%E7%9B%B8%E5%8A%A0/" target="_self">
          <img src="https://tva1.sinaimg.cn/large/e6c9d24ely1gzwwm51pbbj20u00gnwej.jpg" srcset="/gis-yu/img/loading.gif" lazyload alt="02 各位相加">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/gis-yu/2022/03/03/02-%E5%90%84%E4%BD%8D%E7%9B%B8%E5%8A%A0/" target="_self">
          02 各位相加
        </a>
      </h1>

      <p class="index-excerpt">
        <a href="/gis-yu/2022/03/03/02-%E5%90%84%E4%BD%8D%E7%9B%B8%E5%8A%A0/" target="_self">
          
          
            
          
          各位相加题目说明给定一个非负整数 num，反复将各个位上的数字相加，直到结果为一位数。返回这个结果。
示例1123456输入: num = 38输出: 2 解释: 各位相加的过程为：38 --&gt; 3 + 8 --&gt; 1111 --&gt; 1 + 1 --&gt; 2由于 2 是一位数，所以返回 2。

示例212输入: num = 0输出: 0   

解题思路各位相加的解题思路是首
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2022-03-03 20:32" pubdate>
              2022-03-03
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/gis-yu/categories/%E7%AE%97%E6%B3%95/">算法</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/gis-yu/tags/LeetCode/">LeetCode</a>
            
              <a href="/gis-yu/tags/%E5%BE%AA%E7%8E%AF/">循环</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/gis-yu/2022/03/03/01-%E4%BA%8C%E5%88%86%E6%9F%A5%E6%89%BE/" target="_self">
          <img src="https://tva1.sinaimg.cn/large/e6c9d24ely1gzwwm51pbbj20u00gnwej.jpg" srcset="/gis-yu/img/loading.gif" lazyload alt="01 二分查找">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/gis-yu/2022/03/03/01-%E4%BA%8C%E5%88%86%E6%9F%A5%E6%89%BE/" target="_self">
          01 二分查找
        </a>
      </h1>

      <p class="index-excerpt">
        <a href="/gis-yu/2022/03/03/01-%E4%BA%8C%E5%88%86%E6%9F%A5%E6%89%BE/" target="_self">
          
          
            
          
          二分查找题目说明给定一个 n 个元素有序的（升序）整型数组 nums 和一个目标值 target  ，写一个函数搜索 nums 中的 target，如果目标值存在返回下标，否则返回 -1。
示例1123输入: nums = [-1,0,3,5,9,12], target = 9     输出: 4       解释: 9 出现在 nums 中并且下标为 4     

示例2123输入: nums
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2022-03-03 18:58" pubdate>
              2022-03-03
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/gis-yu/categories/%E7%AE%97%E6%B3%95/">算法</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/gis-yu/tags/%E6%95%B0%E7%BB%84/">数组</a>
            
              <a href="/gis-yu/tags/LeetCode/">LeetCode</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/gis-yu/2022/01/04/%E4%BB%80%E4%B9%88%E6%98%AF%E5%8E%9F%E5%9E%8B%E5%92%8C%E5%8E%9F%E5%9E%8B%E9%93%BE%EF%BC%9F/" target="_self">
          <img src="https://tva1.sinaimg.cn/large/008i3skNly1gy1xkk3syrj31hc0u0tcd.jpg" srcset="/gis-yu/img/loading.gif" lazyload alt="什么是原型和原型链？">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/gis-yu/2022/01/04/%E4%BB%80%E4%B9%88%E6%98%AF%E5%8E%9F%E5%9E%8B%E5%92%8C%E5%8E%9F%E5%9E%8B%E9%93%BE%EF%BC%9F/" target="_self">
          什么是原型和原型链？
        </a>
      </h1>

      <p class="index-excerpt">
        <a href="/gis-yu/2022/01/04/%E4%BB%80%E4%B9%88%E6%98%AF%E5%8E%9F%E5%9E%8B%E5%92%8C%E5%8E%9F%E5%9E%8B%E9%93%BE%EF%BC%9F/" target="_self">
          
          
            
          
          原型每个函数对象当中都有一个属性叫prototype。
该属性指向的是一个对象，这个对象就是原型对象。
如果函数作为普通函数调用，则原型对象没有任何作用。
如果作为构造函数调用，那么通过该构造函数所创建的对象中都会有一个隐含的属性指向函数的原型对象（prototype）。

12//实例的隐式原型指向类（构造函数）的显示原型实例.__proto__ === 类.prototype


也就是说该类
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2022-01-04 20:47" pubdate>
              2022-01-04
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/gis-yu/categories/JavaScript/">JavaScript</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/gis-yu/tags/JavaScript/">JavaScript</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/gis-yu/2021/12/12/%E6%B5%8F%E8%A7%88%E5%99%A8%E4%B8%AD%E7%9A%84JavaScript%E8%83%BD%E5%81%9A%E4%BB%80%E4%B9%88%EF%BC%9F/" target="_self">
          <img src="https://tva1.sinaimg.cn/large/008i3skNly1gxbdyy4nv5j31hc0u0js9.jpg" srcset="/gis-yu/img/loading.gif" lazyload alt="浏览器中的JavaScript能做什么？">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/gis-yu/2021/12/12/%E6%B5%8F%E8%A7%88%E5%99%A8%E4%B8%AD%E7%9A%84JavaScript%E8%83%BD%E5%81%9A%E4%BB%80%E4%B9%88%EF%BC%9F/" target="_self">
          浏览器中的JavaScript能做什么？
        </a>
      </h1>

      <p class="index-excerpt">
        <a href="/gis-yu/2021/12/12/%E6%B5%8F%E8%A7%88%E5%99%A8%E4%B8%AD%E7%9A%84JavaScript%E8%83%BD%E5%81%9A%E4%BB%80%E4%B9%88%EF%BC%9F/" target="_self">
          
          
            
          
          
引用自《现代JavaScript教程》

1.浏览器中的JavaScript能做什么？现代的 JavaScript 是一种“安全的”编程语言。它不提供对内存或 CPU 的底层访问，因为它最初是为浏览器创建的，不需要这些功能。
JavaScript 的能力很大程度上取决于它运行的环境。例如，Node.js 支持允许 JavaScript 读取/写入任意文件，执行网络请求等的函数。
浏览器中的 Ja
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2021-12-12 21:44" pubdate>
              2021-12-12
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/gis-yu/categories/JavaScript/">JavaScript</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/gis-yu/tags/%E6%B5%8F%E8%A7%88%E5%99%A8/">浏览器</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/gis-yu/2021/11/30/%E4%BB%80%E4%B9%88%E6%98%AF%E9%98%9F%E5%88%97%EF%BC%9F/" target="_self">
          <img src="https://i.loli.net/2021/11/30/OyHUNjWoYl73ns6.jpg" srcset="/gis-yu/img/loading.gif" lazyload alt="什么是队列？">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/gis-yu/2021/11/30/%E4%BB%80%E4%B9%88%E6%98%AF%E9%98%9F%E5%88%97%EF%BC%9F/" target="_self">
          什么是队列？
        </a>
      </h1>

      <p class="index-excerpt">
        <a href="/gis-yu/2021/11/30/%E4%BB%80%E4%B9%88%E6%98%AF%E9%98%9F%E5%88%97%EF%BC%9F/" target="_self">
          
          
            
          
          定义队列是一种先进先出（FIFO）的、线性的数据结构，与栈的结构类似，只是最先入队到队列的数据，会第一个出队，这与栈相反。 队列常见的应用场景是基于事件的处理系统，例如 JavaScript 事件循环机制、订单处理系统，邮件处理系统等，它们都是基于消息队列实现的。 队列常见的操作有：

入队，把数据添加到队列中。
出队，把数据从队列中取出。
查看队首元素。
查看队列的大小。
判断队列是否为空。


        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2021-11-30 23:12" pubdate>
              2021-11-30
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/gis-yu/categories/%E7%AE%97%E6%B3%95%E4%B8%8E%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">算法与数据结构</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/gis-yu/tags/JavaScript/">JavaScript</a>
            
              <a href="/gis-yu/tags/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">数据结构</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/gis-yu/2021/11/26/%E4%BB%80%E4%B9%88%E6%98%AF%E6%A0%88%EF%BC%9F/" target="_self">
          <img src="https://i.loli.net/2021/11/26/DCoQehcv4LM8zxr.png" srcset="/gis-yu/img/loading.gif" lazyload alt="什么是栈？">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/gis-yu/2021/11/26/%E4%BB%80%E4%B9%88%E6%98%AF%E6%A0%88%EF%BC%9F/" target="_self">
          什么是栈？
        </a>
      </h1>

      <p class="index-excerpt">
        <a href="/gis-yu/2021/11/26/%E4%BB%80%E4%B9%88%E6%98%AF%E6%A0%88%EF%BC%9F/" target="_self">
          
          
            
          
          定义栈是一种线性的、后进先出的数据结构。线性指的是和数组一样，栈中的数据只有一个维度，每个元素依次排列。后进先出指的是，最后添加到栈中的元素，会第一个从栈中取出来。 JavaScript 的函数调用栈就是用栈来实现的，另外也可以用栈实现带小括号的数学表达式的计算。 栈的基本操作有 push() 入栈和 pop() 出栈两个，入栈会把元素添加到栈的顶部，栈的大小加 1，出栈则会把栈顶的元素弹出，栈的
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2021-11-26 18:24" pubdate>
              2021-11-26
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/gis-yu/categories/%E7%AE%97%E6%B3%95%E4%B8%8E%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">算法与数据结构</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/gis-yu/tags/JavaScript/">JavaScript</a>
            
              <a href="/gis-yu/tags/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">数据结构</a>
            
          </div>
        
      </div>
    </article>
  </div>



  <nav aria-label="navigation">
    <span class="pagination" id="pagination">
      <span class="page-number current">1</span><a class="page-number" href="/gis-yu/page/2/#board">2</a><a class="extend next" rel="next" href="/gis-yu/page/2/#board"><i class="iconfont icon-arrowright"></i></a>
    </span>
  </nav>



              </div>
            </div>
          </div>
        </div>
      </div>
    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
    

    
  </main>

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
     <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
  </div>
  
  <div class="statistics">
    
    

    
      
        <!-- 不蒜子统计PV -->
        <span id="busuanzi_container_site_pv" style="display: none">
            总访问量 
            <span id="busuanzi_value_site_pv"></span>
             次
          </span>
      
      
        <!-- 不蒜子统计UV -->
        <span id="busuanzi_container_site_uv" style="display: none">
            总访客数 
            <span id="busuanzi_value_site_uv"></span>
             人
          </span>
      
    
  </div>


  

  
</footer>


  <!-- SCRIPTS -->
  
  <script  src="https://cdn.jsdelivr.net/npm/nprogress@0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nprogress@0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js" ></script>
<script  src="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/js/bootstrap.min.js" ></script>
<script  src="/gis-yu/js/events.js" ></script>
<script  src="/gis-yu/js/plugins.js" ></script>

<!-- Plugins -->


  <script  src="/gis-yu/js/local-search.js" ></script>



  
    <script  src="/gis-yu/js/img-lazyload.js" ></script>
  



  





  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>




  <script  src="https://cdn.jsdelivr.net/npm/typed.js@2/lib/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var title = document.getElementById('subtitle').title;
      
      typing(title)
      
    })(window, document);
  </script>















<!-- 主题的启动项 保持在最底部 -->
<script  src="/gis-yu/js/boot.js" ></script>


<!-- hexo injector body_end start -->
<link rel="stylesheet" href="/css/customize.css">
<!-- hexo injector body_end end --></body>
</html>
